/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Changed: Updated background gradient to pink tones */
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    overflow: hidden;
}

/* Main game container with responsive height */
.game-container {
    width: 100%;
    height: 450px; /* Default iframe height */
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Responsive height for full browser */
@media (min-height: 600px) and (min-width: 800px) {
    .game-container {
        height: 90vh;
    }
}

/* Progress bar styling */
.progress-container {
    padding: 12px 20px;
    /* Changed: Updated progress bar gradient to pink tones */
    background: linear-gradient(90deg, #ff6b9d, #e84393);
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 20%;
}

.progress-text {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* Main game content area */
.game-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

/* Story panel styling */
.story-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    /* Changed: Updated border color to pink */
    border: 2px solid #fce4ec;
    animation: slideIn 0.5s ease;
}

.scenario-image {
    text-align: center;
    margin-bottom: 15px;
}

.scenario-icon {
    font-size: 48px;
    display: inline-block;
    animation: bounce 2s infinite;
}

.story-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    text-align: center;
}

/* Decision panel styling */
.decision-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.decision-btn {
    /* Changed: Updated decision button gradient to pink tones */
    background: linear-gradient(135deg, #ff6b9d, #e84393);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Changed: Updated box shadow to pink tones */
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
    min-height: 56px; /* Touch-friendly height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.decision-btn:hover {
    transform: translateY(-2px);
    /* Changed: Updated hover box shadow to pink tones */
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.decision-btn:active {
    transform: translateY(0);
}

.decision-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Information panel styling */
.info-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    /* Changed: Updated border color to pink */
    border: 3px solid #ff6b9d;
    max-width: 90%;
    z-index: 100;
    animation: popIn 0.3s ease;
}

.info-header {
    font-size: 18px;
    font-weight: 700;
    /* Changed: Updated info header color to pink */
    color: #ff6b9d;
    margin-bottom: 12px;
    text-align: center;
}

.info-text {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 16px;
}

.close-info-btn {
    /* Changed: Updated close info button color to pink */
    background: #ff6b9d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
}

/* Navigation controls */
.nav-controls {
    padding: 12px 20px;
    background: #f5f5f5;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #ddd;
}

.nav-btn {
    background: white;
    border: 2px solid #ddd;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 120px;
    min-height: 44px; /* Touch-friendly */
}

.nav-btn:hover:not(:disabled) {
    /* Changed: Updated nav button hover colors to pink */
    background: #ff6b9d;
    color: white;
    border-color: #ff6b9d;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Celebration overlay */
.celebration-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Changed: Updated celebration overlay background to pink */
    background: rgba(255, 107, 157, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.5s ease;
}

.celebration-content {
    text-align: center;
    color: white;
}

.celebration-icon {
    font-size: 72px;
    margin-bottom: 16px;
    animation: bounce 1s ease infinite;
}

.celebration-text {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.celebration-detail {
    font-size: 16px;
    opacity: 0.9;
}

/* Summary page styling */
.summary-page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Changed: Updated summary page background gradient to pink tones */
    background: linear-gradient(135deg, #ff6b9d, #e84393);
    color: white;
    padding: 20px;
    overflow-y: auto;
    z-index: 150;
    animation: slideUp 0.5s ease;
}

.summary-header {
    text-align: center;
    margin-bottom: 24px;
}

.summary-icon {
    font-size: 64px;
    margin-bottom: 12px;
}

.summary-header h2 {
    font-size: 24px;
    margin: 0;
}

.summary-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 16px;
}

.stat-value {
    font-weight: 700;
}

/* Modified: Added styling for score breakdown section */
.score-breakdown {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.score-breakdown h3 {
    margin-bottom: 12px;
    font-size: 18px;
}

.score-details {
    margin-bottom: 16px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.score-item:last-child {
    border-bottom: none;
}

.scenario-name {
    font-weight: 600;
    flex: 1;
}

.score-points {
    font-weight: 700;
    margin-left: 10px;
}

.score-excellent {
    color: #4caf50;
}

.score-good {
    color: #ffeb3b;
}

.score-poor {
    color: #f44336;
}

.calculation-explanation {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.calculation-explanation p {
    margin-bottom: 8px;
}

.calculation-explanation p:last-child {
    margin-bottom: 0;
}

.key-learnings {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.key-learnings h3 {
    margin-bottom: 12px;
    font-size: 18px;
}

.key-learnings ul {
    list-style: none;
    padding: 0;
}

.key-learnings li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.key-learnings li:before {
    content: "✓";
    position: absolute;
    left: 0;
    /* Changed: Updated checkmark color to light pink */
    color: #ffb3d1;
    font-weight: bold;
}

.play-again-btn {
    background: white;
    /* Changed: Updated play again button color to pink */
    color: #ff6b9d;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.play-again-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* Tooltip styling */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    max-width: 200px;
    text-align: center;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .game-content {
        padding: 15px;
        gap: 15px;
    }
    
    .story-panel {
        padding: 16px;
    }
    
    .story-text {
        font-size: 14px;
    }
    
    .decision-btn {
        font-size: 14px;
        padding: 14px 20px;
    }
    
    .nav-controls {
        padding: 10px 15px;
    }
    
    .nav-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    /* Modified: Mobile responsive adjustments for score breakdown */
    .score-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .score-points {
        margin-left: 0;
    }
    
    .calculation-explanation {
        font-size: 12px;
    }
}